package br.com.scpe.util;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;

import br.com.scpe.ejb.entity.Perfil;

public class PerfilConverter implements Converter {

	@Override
	public Object getAsObject(FacesContext facesContext, UIComponent component, String value) {
		return Enum.valueOf(Perfil.class, value);
	}
	
	@Override
	public String getAsString(FacesContext facesContext, UIComponent component, Object value) {
		return value.toString();
	}

}
